﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="uscColor.ascx.cs" Inherits="KCL.Components.uscColor" %>
<style type="text/css">
    .style1
    {
        width: 110px;
    }
</style>
<table style="width: 930px;">
    <tr>
        <td class="style1">
            Tên loại màu
        </td>
        <td>
            <asp:TextBox ID="txtColorName" runat="server"></asp:TextBox>
        </td>
        <td align="right" width="100px">
            <asp:Button ID="btnAddColor" runat="server" OnClick="btnAddColor_Click" Text="Thêm"
                Width="70px" />
        </td>
    </tr>
</table>
<asp:GridView ID="dgvColor" runat="server" AllowPaging="True" AutoGenerateColumns="False"
    BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px"
    CellPadding="4" DataKeyNames="id" DataSourceID="srcColor" ForeColor="Black" GridLines="Vertical"
    Width="930px" EnableModelValidation="True">
    <AlternatingRowStyle BackColor="White" />
    <Columns>
        <asp:BoundField DataField="name" HeaderText="Tên loại màu" />
        <asp:CommandField ShowEditButton="True" CausesValidation="False" CancelText="Đóng"
            EditText="Sửa" UpdateText="Lưu" />
        <asp:TemplateField ShowHeader="False">
            <ItemTemplate>
                <asp:LinkButton Style="color: Black" ID="LinkButton1" runat="server" CausesValidation="False"
                    CommandName="Delete" Text="Xóa" OnClientClick="javascript:return confirm('Bạn có chắc muốn xóa dòng này?');"></asp:LinkButton>
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
    <FooterStyle BackColor="#CCCC99" />
    <HeaderStyle BackColor="#FFFFCC" Font-Bold="True" ForeColor="#CC0000" />
    <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
    <RowStyle BackColor="#F7F7DE" />
    <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
</asp:GridView>
<asp:ObjectDataSource ID="srcColor" runat="server" DataObjectTypeName="KCL.Code.Color"
    DeleteMethod="Delete" InsertMethod="Insert" SelectMethod="GetAllColors" TypeName="KCL.Code.Business.ColorServices"
    UpdateMethod="Update"></asp:ObjectDataSource>
